<?php

namespace app\admin\controller;

use app\common\controller\AdminBase;
use think\Controller;
use think\Db;

class Idea extends AdminBase
{
    protected function _initialize()
    {
        parent::_initialize();
    }
    public function index($page = 1)
    {
        $idea_list = Db::table('lsj_contact_us')
            ->alias("a")
            ->join("lsj_user ur","a.uid=ur.uid","LEFT")
            ->field('ur.*,a.introduce,a.created_at,a.contact')
            ->order("a.created_at desc")
            ->paginate(15, false, ['page' => $page]);

        return $this->fetch('index', ['idea_list'=>$idea_list]);
    }
}